<template>
	<view class="">
		<view class="headTop">
			<view class=" u-flex u-p-l-30 u-p-t-30 u-p-b-30">
				<view class="u-m-r-10">
					<image :src="avatar" style="width: 100rpx;height: 100rpx;border-radius: 100rpx;"
						@click="goNavs('/pages/my/userinfo')"></image>
				</view>
				<view class="u-flex-1 u-m-l-10 text-white" v-if="!isLogin">
					<view class=" u-font-18  text-bold" style="color: #FFFFFF;" @click="goNav('/pages/my/userinfo')">
						{{userName}}
					</view>
					<view class="" v-if="XCXIsSelect != '否'">
						<view v-if="geRen == 0" class="u-font-12" @click.stop="goNav('/my/renzheng/index?classify=2')"
							style="display: inline-block; color: #FFFFFF;font-weight: 400;">
							未入驻
						</view>
						<view v-else-if="geRen == 1" class="u-font-12"
							@click.stop="goNav('/my/renzheng/index?classify=2')"
							style="display: inline-block; color: #FFFFFF;font-weight: 400;">
							审核中
						</view>
						<view v-else-if="geRen == 2" class="u-font-12"
							@click.stop="goNav('/my/renzheng/index?classify=2')"
							style="display: inline-block; color: #FFFFFF;font-weight: 400;">
							已入驻
						</view>
						<view v-else-if="geRen == 3" class="u-font-12"
							@click.stop="goNav('/my/renzheng/index?classify=2')"
							style="display: inline-block; color: #FFFFFF;font-weight: 400;">
							已拒绝
						</view>
					</view>
				</view>
				<view v-else class="text-xl u-p-l-20 text-bold" @click="goLogin('/pages/public/login')"
					style="color: #FFFFFF;">
					登录
				</view>
			</view>
		</view>

		<view style="position: relative;top: -80upx;">
			<view class="bg margin-lr padding" style="border-radius: 24upx;">
				<view>我的接单</view>
				<view class="flex justify-between padding-lr-xs margin-top-sm">
					<view class="text-center" @click="goNav('/my/takeOrder/index?index=1')">
						<image src="../../static/images/my/order1.png" style="width: 60upx;height: 60upx;"></image>
						<view>待服务</view>
					</view>
					<view class="text-center" @click="goNav('/my/takeOrder/index?index=2')">
						<image src="../../static/images/my/order2.png" style="width: 60upx;height: 60upx;"></image>
						<view>进行中</view>
					</view>
					<view class="text-center" @click="goNav('/my/takeOrder/index?index=3')">
						<image src="../../static/images/my/order3.png" style="width: 60upx;height: 60upx;"></image>
						<view>已完成</view>
					</view>
				</view>
			</view>
			<view class="bg margin radius">
				<!-- 是否上线 -->
				<!-- <view class="list_box">
					<view class="list_left">
						<image src="../../static/my/kg.png" mode="scaleToFill" class="list_img"></image>
						<view class="list_name">上线开关</view>
					</view>
					<u-switch v-model="checked" active-color="#70b4f7" inactive-color="#eee" size="45" @change="change"
						:loading="loading"></u-switch>
				</view> -->
				<view class="flex padding-lr padding-tb dfs">
					<image src="../../static/images/my/kaig.png" style="width: 50upx;height: 50rpx;" mode=""></image>
					<view class="flex-sub margin-left text-df" style="line-height: 50upx;">上线开关</view>
					<u-switch v-model="checked" active-color="#70b4f7" inactive-color="#eee" size="45" @change="change"
						:loading="loading"></u-switch>
				</view>
				<!-- 我的报价-->
				<view class="flex padding-lr padding-tb dfs" @click="goNavs('/my/takeOrder/baojia')"
					v-if="XCXIsSelect != '否'">
					<image src="../../static/images/my/baijia.png" style="width: 45upx;height: 50rpx;" mode=""></image>
					<view class="flex-sub margin-left text-df" style="line-height: 50upx;">我的报价</view>
					<image src="../../static/images/my/right.png" class="images" mode=""></image>
				</view>
				<!-- 保证金 -->
				<view class="flex padding-lr padding-tb dfs" @click="goNav('/my/wallet/baozhengjin')"
					v-if="XCXIsSelect != '否'&&baozhengjin!=0">
					<image src="../../static/images/my/baozhengjin.png" style="width:54rpx;height: 54rpx;" mode="">
					</image>
					<view class="flex-sub margin-left text-df" style="line-height: 50upx;">保证金</view>
					<image src="../../static/images/my/right.png" class="images" mode=""></image>
				</view>
				<!-- 我的钱包 -->
				<view class="flex padding-lr padding-tb dfs" @click="goNav('/my/wallet/index')"
					v-if="XCXIsSelect != '否'">
					<image src="../../static/images/my/qianbao.png" style="width: 50rpx;height: 50rpx;" mode=""></image>
					<view class="flex-sub margin-left text-df" style="line-height: 50upx;">我的钱包</view>
					<image src="../../static/images/my/right.png" class="images" mode=""></image>
				</view>
				<!-- 帮助中心 -->
				<view class="flex padding-lr padding-tb dfs" @click="goNav('/my/feedbackIndex/feedbackIndex')">
					<image src="../../static/images/my/help.png" style="width: 50rpx;height: 50rpx;" mode=""></image>
					<view class="flex-sub margin-left text-df" style="line-height: 50upx;">帮助中心</view>
					<image src="../../static/images/my/right.png" class="images" mode=""></image>
				</view>
				<!-- 意见反馈 -->
				<view class="flex padding-lr padding-tb dfs" @click="goNav('/my/feedback/index')">
					<image src="../../static/images/my/yijian.png" style="width: 50rpx;height: 50rpx;" mode=""></image>
					<view class="flex-sub margin-left text-df" style="line-height: 50upx;">意见反馈</view>
					<image src="../../static/images/my/right.png" class="images" mode=""></image>
				</view>
				<!-- 在线客服 -->
				<view class="flex padding-lr padding-tb" @click="gochat()">
					<image src="../../static/images/my/kefu.png" style="width: 50rpx;height: 50rpx;" mode=""></image>
					<view class="flex-sub margin-left text-df" style="line-height: 50upx;">在线客服</view>
					<image src="../../static/images/my/right.png" class="images" mode=""></image>
				</view>
				<!-- 设置中心 -->
				<view class="flex padding-lr padding-tb dfs" @click="goNav('/my/setting/index')">
					<image src="../../static/images/my/set.png" style="width: 50rpx;height: 50rpx;" mode=""></image>
					<view class="flex-sub margin-left text-df" style="line-height: 50upx;">设置中心</view>
					<image src="../../static/images/my/right.png" class="images" mode=""></image>
				</view>
			</view>
			
			<view class="bg margin radius">
				<!-- 员工管理 -->
				<!-- {{XCXIsSelect != '否'&&Qe==2}} -->
				<view class="flex padding-lr padding-tb dfs" @click="goUserClient()">
					<image src="../../static/images/my/user-client.png" style="width: 50rpx;height: 50rpx;" mode=""></image>
					<view class="flex-sub margin-left text-df" style="line-height: 50upx;">我要下单找师傅</view>
					<image src="../../static/images/my/right.png" class="images" mode=""></image>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				avatar: '../../static/logos.png',
				isLogin: true,
				userName: '匿名',
				browse: 0, //浏览数
				fans: 0, //粉丝数
				follow: 0, //关注数
				visitor: 0, //访客数
				userId: '',
				isVip: false,
				invitationCode: '', //邀请码
				geRen: 0,
				// Qe: 0,
				XCXIsSelect: '否',
				renzheng: false,
				classify: 1,
				userId: '',
				arr: [],
				showModal: true,

				isAuthentication: '',
				baozhengjin: 0,

				checked: false,
				loading: false,
				// 中间变量，避免在watch中多次回调，造成无限循环
				controlStatus: false,
				isSafetyMoney: 0,
				timer: '',
				longitude: '',
				latitude: '',
				onLine: ''
			}
		},
		onLoad() {

			this.classify = uni.getStorageSync("classify") ? uni.getStorageSync("classify") : '1'

			this.userId = uni.getStorageSync('userId')
			if (this.userId) {

				this.$Request.getT('/app/common/type/261').then(res => { //商家私聊消息通知
					if (res.code == 0) {
						if (res.data && res.data.value) {
							this.arr.push(res.data.value)
						}
					}
				})
				this.$Request.getT('/app/common/type/313').then(res => { //订单状态通知 313
					if (res.code == 0) {
						if (res.data && res.data.value) {
							this.arr.push(res.data.value)
						}
					}
				})
				this.$Request.getT('/app/common/type/630').then(res => { //新订单通知
					if (res.code == 0) {
						if (res.data && res.data.value) {
							this.arr.push(res.data.value)
						}
					}
				})

				this.geRen = uni.getStorageSync("geRen")
				if (this.geRen == 2) {
					let that = this
					uni.getLocation({
						type: 'gcj02',
						isHighAccuracy: true,
						success: function(res) {
							console.log('当前位置的经度：' + res.longitude);
							console.log('当前位置的纬度：' + res.latitude);
							that.longitude = res.longitude
							that.latitude = res.latitude
							// that.longitude = '108.9491305325646'
							// that.latitude ='34.36840241214453'

							that.getsfwz() //师傅位置

						}
					});
					that.timer = setInterval(function() {
						let that = this
						uni.getLocation({
							type: 'gcj02',
							isHighAccuracy: true,
							success: function(res) {
								console.log('当前位置的经度：' + res.longitude);
								console.log('当前位置的纬度：' + res.latitude);
								that.longitude = res.longitude
								that.latitude = res.latitude
								that.getsfwz() //师傅位置

							}
						});
						// 	that.getsfwz() //师傅位置
					}, 600000)
				}
			}


		},

		onShow() {
			this.XCXIsSelect = this.$queue.getData("XCXIsSelect");
			this.$Request.get("/app/common/type/616").then(res => {
				if (res.code == 0 && res.data) {
					this.baozhengjin = res.data.value
				} else {
					this.baozhengjin = 0
				}
			});
			// this.Qe = uni.getStorageSync("Qe")
			// this.geRen = uni.getStorageSync("geRen")
			// if (this.geRen == 2) {
			// 	this.renzheng = false
			// } else {
			// 	this.renzheng = true
			// }
			this.userId = uni.getStorageSync('userId')
			if (this.userId) {
				this.isLogin = false
				this.getUserInfo()
				this.getRenZheng()

				this.getAmount()
				this.getIsVip()
				// #ifdef MP-WEIXIN
				//订阅
				if (this.showModal) {
					this.openMsg()
				}
				// #endif
			} else {
				this.isLogin = true
				this.userName = '匿名'
				this.browse = 0
				this.fans = 0
				this.follow = 0
				this.visitor = 0
				this.baozhengjin = 0
				this.avatar = '../../static/logos.png'
				this.onLine = ''
				this.checked = false

				clearInterval(this.timer)
			}

		},
		methods: {
			// 开启订阅消息
			openMsg() {
				console.log('订阅消息')
				var that = this
				uni.getSetting({
					withSubscriptions: true, //是否获取用户订阅消息的订阅状态，默认false不返回
					success(ret) {
						console.log(ret.subscriptionsSetting, '------------------')
						// if (ret.subscriptionsSetting.itemSettings && Object.keys(ret.subscriptionsSetting.itemSettings).length == 2) {
						if (ret.subscriptionsSetting.itemSettings) {
							uni.setStorageSync('sendMsg', true)
							uni.openSetting({ // 打开设置页 
								success(rea) {
									console.log(rea.authSetting)
								}
							});
						} else { // 用户没有点击“总是保持以上，不再询问”则每次都会调起订阅消息
							console.log(99999)
							uni.setStorageSync('sendMsg', false)
							uni.showModal({
								title: '提示',
								content: '为了更好的体验,请绑定消息推送',
								confirmText: '确定',
								cancelText: '取消',
								success: function(res) {
									if (res.confirm) {
										wx.requestSubscribeMessage({
											tmplIds: that.arr,
											success(re) {
												console.log(JSON.stringify(re),
													'++++++++++++++')
												var datas = JSON.stringify(re);
												if (datas.indexOf("accept") != -1) {
													console.log(re)
													uni.setStorageSync('sendMsg', true)
												}
											},
											fail: (res) => {
												console.log(res)
											}
										})
										// uni.setStorageSync('sendMsg', true)
										console.log('确认')
										that.showModal = false
									} else if (res.cancel) {
										console.log('取消')
										// uni.setStorageSync('sendMsg', false)
										that.showModal = true
									}
								}
							})
						}
					}
				})
			},
			getsfwz() {
				let data = {
					typeName: this.latitude,
					typeId: this.longitude,
					userId: this.userId
				}
				this.$Request.postJson("/app/message/insertMasterLocation", data).then(res => {
					if (res.code == 0) {}
				});
			},
			// switch打开或者关闭时触发，值为true或者false
			change(status) {
				let that = this
				if (!that.userId) {
					that.loading = false;
					that.controlStatus = false
					uni.showModal({
						title: '提示',
						content: '您还未登录,请先登录',
						complete: function(res) {
							if (res.confirm) {
								console.log('用户点击确定');
								uni.navigateTo({
									url: '/pages/public/login'
								})
							} else if (res.cancel) {
								console.log('用户点击取消');
							}
						}
					})
				} else {
					if (that.geRen == 2) {
						that.loading = false;
						that.controlStatus = false
						if (that.baozhengjin != 0 && that.isSafetyMoney == 0) {
							uni.showModal({
								title: '提示',
								content: '您还未缴纳保证金，请先去缴纳保证金',
								complete: function(ret) {
									that.loading = false;
									that.controlStatus = false
									if (ret.confirm) {
										uni.navigateTo({
											url: '/my/wallet/baozhengjin'
										})
									} else if (ret.cancel) {
										console.log('---8989--', that.checked)
										if (that.onLine == 1) {
											that.checked = true
										} else {
											that.checked = false
										}
										that.loading = false;
										that.controlStatus = false
										console.log('-----', that.checked)
									}
								}
							})
							return
						} else {
							if (that.checked == false) {
								if (that.controlStatus == true) {
									that.controlStatus = false;
									return;
								}
								// 重新打开switch，并让它处于加载中的状态
								that.checked = true;
								if (uni.getStorageSync('token')) {
									that.loading = true;
									that.getRestultFromServer();
								} else {
									uni.navigateTo({
										url: '/pages/login/login'
									})
								}
								// 模拟向后端发起请求
							} else if (that.checked == true) {
								if (that.controlStatus == true) {
									that.controlStatus = false;
									return;
								}
								// 重新关闭switch，并让它处于加载中的状态
								that.checked = false;
								// 模拟向后端发起请求
								if (uni.getStorageSync('token')) {
									that.loading = true;
									that.getRestultFromServer1();
								} else {
									uni.navigateTo({
										url: '/pages/login/login'
									})
								}
							}
						}
					} else if (that.Qe == 1) {
						uni.showModal({
							title: '提示',
							content: '实名认证审核中,请稍等',
							success: function(res) {
								if (res.confirm) {
									console.log('用户点击确定');
								} else if (res.cancel) {
									console.log('用户点击取消');
								}
							}
						})
					} else {
						uni.showModal({
							title: '提示',
							content: '您还未实名认证,请先认证',
							success: function(res) {
								if (res.confirm) {
									console.log('用户点击确定');
									uni.navigateTo({
										url: '/my/renzheng/index?classify=' + that.classify
									})
								} else if (res.cancel) {
									console.log('用户点击取消');
								}
							}
						})
					}

				}
			},
			getRestultFromServer() {
				this.controlStatus = true;
				// 后端允许用户关闭switch，设置checked为false，结束loading状态
				let that = this
				uni.showModal({
					title: '提示',
					content: '确定要下线吗',
					complete: function(ret) {
						if (ret.confirm) {
							console.log('用户点击确定');
							uni.showLoading({
								title: '修改中...',
							})
							that.$Request.postJson("/app/userCertification/updateCertification", {
								onLine: 2,
								userId: that.userId
							}).then(res => {
								uni.hideLoading();
								that.loading = false;
								that.controlStatus = false
								if (res.code === 0) {
									that.checked = false;

									that.getRenZheng();
								} else {
									that.$queue.showToast(res.msg)
								}
							});
						} else if (ret.cancel) {
							console.log('用户点击取消');
							that.checked = true;
							that.loading = false;
							that.controlStatus = false
						}
					},
				});
			},
			getRestultFromServer1() {
				// 通过定时器模拟向后端请求
				this.controlStatus = true;
				// 后端允许用户关闭switch，设置checked为false，结束loading状态
				let that = this
				uni.showModal({
					title: '提示',
					content: '确定要上线吗',
					complete: function(ret) {
						if (ret.confirm) {
							console.log('用户点击确定');
							uni.showLoading({
								title: '修改中...',
							})
							that.$Request.postJson("/app/userCertification/updateCertification", {
								onLine: 1,
								userId: that.userId
							}).then(res => {
								uni.hideLoading();
								that.loading = false;
								that.controlStatus = false
								if (res.code === 0) {
									that.checked = true;
									that.getRenZheng();
								} else {
									that.$queue.showToast(res.msg)
								}
							});
						} else if (ret.cancel) {
							that.loading = false;
							console.log('用户点击取消');
							that.checked = false;
							that.controlStatus = false
						}
					}
				});
			},
			gochat() {
				let that = this
				let kefu = this.$queue.getData('kefu'); // 用户端联系方式 1 手机号 2企业微信 3 客服二维码  4在线客服
				let kefuPhone = this.$queue.getData('kefuPhone');
				if (kefu == 1) {
					uni.makePhoneCall({
						phoneNumber: kefuPhone //仅为示例
					});
				} else if (kefu == 3) { //客服二维码
					uni.navigateTo({
						url: '/my/setting/customer'
					});
				} else if (kefu == 2) {
					// #ifdef MP-WEIXIN
					try {
						wx.openCustomerServiceChat({
							extInfo: {
								url: that.$queue.getData('kefuUrl')
							},
							corpId: that.$queue.getData('kefuAppId'),
							success(res) {},
							fail(res) {
								console.error(res)
							}
						})
					} catch (error) {
						console.error("catchcatch" + error)
						uni.showToast({
							title: '请更新至微信最新版本'
						});
					}
					// #endif
					// #ifndef MP-WEIXIN
					let url = that.$queue.getData('kefuUrl');
					if (url.indexOf('/pages/') !== -1 || url.indexOf('/my/') !== -1) {
						uni.navigateTo({
							url
						});
					} else {
						//#ifndef H5
						uni.navigateTo({
							url: '/pages/index/webView?url=' + url
						});
						//#endif
						//#ifdef H5
						window.location.href = url;
						//#endif
					}
					// #endif

				} else if (kefu == 4) {
					let token = that.$queue.getData('token');
					if (token) {
						// #ifdef MP-WEIXIN
						wx.requestSubscribeMessage({
							tmplIds: that.arr,
							success(re) {
								var datas = JSON.stringify(re);
								if (datas.indexOf("accept") != -1) {
									// console.log(re)
								}
							},
							fail: (res) => {
								// console.log(res)
							}
						})
						// #endif
						uni.navigateTo({
							url: '/my/setting/chat'
						});
					} else {
						uni.showModal({
							title: '提示',
							content: '您还未登录,请先登录',
							success: function(res) {
								if (res.confirm) {
									console.log('用户点击确定');
									uni.navigateTo({
										url: '/pages/public/login'
									})
								} else if (res.cancel) {
									console.log('用户点击取消');
								}
							}
						})
					}
				}
			},
			// 跳转商户端
			goshop() {
				wx.navigateToMiniProgram({
					appId: 'wxfe0e405895cafdf9',
					path: '',
					envVersion: 'release', // 打开正式版
					success(res) {
						// 打开成功
					},
					fail: function(err) {
						console.log(err);
					}
				})
			},
			goNav(e, name) {
				console.log('授权+1')
				wx.requestSubscribeMessage({
					tmplIds: this.arr,
					success(re) {
						console.log(JSON.stringify(re), 111111111111)
						var datas = JSON.stringify(re);
						if (datas.indexOf("accept") != -1) {
							// console.log(re)
						}
					},
					fail: (res) => {
						// console.log(res)
					}
				})
				console.log(e)
				if (this.userId) {
					uni.navigateTo({
						url: e
					})

				} else {
					uni.showModal({
						title: '提示',
						content: '您还未登录,请先登录',
						success: function(res) {
							if (res.confirm) {
								console.log('用户点击确定');
								uni.navigateTo({
									url: '/pages/public/login'
								})
							} else if (res.cancel) {
								console.log('用户点击取消');
							}
						}
					})
				}
			},
			goNavs(e, name) {
				let that = this
				// #ifdef MP-WEIXIN

				wx.requestSubscribeMessage({
					tmplIds: this.arr,
					success(re) {
						var datas = JSON.stringify(re);
						if (datas.indexOf("accept") != -1) {
							// console.log(re)
						}
					},
					fail: (res) => {
						// console.log(res)
					}
				})
				// #endif
				console.log(e)
				if (this.userId) {
					if (this.geRen == 2) {
						uni.navigateTo({
							url: e
						})
					} else if (this.Qe == 1) {
						uni.showModal({
							title: '提示',
							content: '实名认证审核中,请稍等',
							success: function(res) {
								if (res.confirm) {
									console.log('用户点击确定');
									// uni.navigateTo({
									// 	url: '/my/renzheng/index'
									// })
								} else if (res.cancel) {
									console.log('用户点击取消');
								}
							}
						})
					} else {
						uni.showModal({
							title: '提示',
							content: '您还未实名认证,请先认证',
							success: function(res) {
								if (res.confirm) {
									console.log('用户点击确定');
									uni.navigateTo({
										url: '/my/renzheng/index?classify=' + that.classify
									})
								} else if (res.cancel) {
									console.log('用户点击取消');
								}
							}
						})
					}
				} else {
					uni.showModal({
						title: '提示',
						content: '您还未登录,请先登录',
						success: function(res) {
							if (res.confirm) {
								console.log('用户点击确定');
								uni.navigateTo({
									url: '/pages/public/login'
								})
							} else if (res.cancel) {
								console.log('用户点击取消');
							}
						}
					})
				}
			},
			goLogin(e) {
				// #ifdef MP-WEIXIN
				wx.requestSubscribeMessage({
					tmplIds: this.arr,
					success(re) {
						var datas = JSON.stringify(re);
						if (datas.indexOf("accept") != -1) {
							// console.log(re)
						}
					},
					fail: (res) => {
						// console.log(res)
					}
				})
				// #endif
				uni.navigateTo({
					url: e
				})
			},
			getAmount() {
				this.$Request.get("/app/userBrowse/selectAmount").then(res => {
					if (res.code == 0) {
						this.browse = res.data.browse
						this.fans = res.data.fans
						this.follow = res.data.follow
						this.visitor = res.data.visitor
					}
				});
			},
			getUserInfo() {
				this.$Request.get("/app/user/selectUserById").then(res => {
					if (res.code == 0) {
						this.userName = res.data.userName
						this.invitationCode = res.data.invitationCode
						this.avatar = res.data.avatar ? res.data.avatar : '../../static/logos.png'
						this.isAuthentication = res.data.isAuthentication
						this.isSafetyMoney = res.data.isSafetyMoney
						uni.setStorageSync('isAuthentication', res.data.isAuthentication)
						uni.setStorageSync('isSafetyMoney', res.data.isSafetyMoney) //是否缴纳保证金 0否 1是

						uni.setStorageSync('avatar', res.data.avatar)
						uni.setStorageSync('invitationCode', res.data.invitationCode)
						uni.setStorageSync('zhiFuBao', res.data.zhiFuBao)
						uni.setStorageSync('zhiFuBaoName', res.data.zhiFuBaoName)

					}
				});
			},
			// 个人认证数据
			getRenZheng() {
				this.$Request.get("/app/userCertification/queryInsert").then(res => {
					if (res.code == 0 && res.data) {
						if (res.data && res.data.classify) {
							this.classify = res.data.classify
							uni.setStorageSync("classify", res.data.classify)
						}
						this.onLine = res.data.onLine
						if (res.data.onLine == 1) {
							this.checked = true
						} else {
							this.checked = false
						}
						if (res.data == null) {
							this.geRen = 0
							uni.setStorageSync("geRen", this.geRen)
						} else if (res.data.status == 0) {
							this.geRen = 1
							uni.setStorageSync("geRen", this.geRen)
						} else if (res.data.status == 1) {
							this.geRen = 2
							uni.setStorageSync("geRen", this.geRen)
						} else if (res.data.status == 2) {
							this.geRen = 3
							uni.setStorageSync("geRen", this.geRen)
						}
					} else {
						this.checked = false
					}
				});
			},
			// 企业认证数据
			// getRenZhengs() {
			// 	this.$Request.get("/app/userCertification/queryInsert?classify=2" ).then(res => {
			// 		console.log(res)
			// 		if (res.code == 0) {
			// 			if( res.data&& res.data.classify){
			// 				this.classify = res.data.classify
			// 				uni.setStorageSync("classify", res.data.classify)
			// 			}
			// 			if (res.data == null) { //未实名
			// 				this.Qe = 0
			// 				uni.setStorageSync("Qe", this.Qe)
			// 			} else if (res.data.status == 0) { //审核中
			// 				this.Qe = 1
			// 				uni.setStorageSync("Qe", this.Qe)
			// 			} else if (res.data.status == 1) { //已实名
			// 				this.Qe = 2
			// 				uni.setStorageSync("Qe", this.Qe)
			// 			} else if (res.data.status == 2) { //已拒绝
			// 				this.Qe = 3
			// 				uni.setStorageSync("Qe", this.Qe)
			// 			}
			// 		}
			// 	});
			// },
			getIsVip() {
				this.$Request.get("/app/UserVip/isUserVip").then(res => {
					if (res.code == 0) {
						this.isVip = res.data
						uni.setStorageSync('isVIP', res.data)
					}
				});
			},
			/**
			 * 跳转到用户端
			 */
			goUserClient(){
				let userAppId = this.$queue.getData('userAppId')
				//#ifdef MP-WEIXIN
				wx.navigateToMiniProgram({
					appId: userAppId,
					path: '/pages/index/index',
					envVersion: 'release', // 打开正式版
					success(res) {
						// 打开成功
					},
					fail: function(err) {
						console.log(err);
					}
				})
				// #endif 
			}
		}
	}
</script>

<style lang="scss">
	page {
		background: #F5F5F5;
	}

	.bg {
		background: #FFFFFF;
	}

	.headTop {
		// background: linear-gradient(0deg, rgba(255, 255, 255, 0) 0%, #557EFD 100%);
		height: 250rpx;
		background: linear-gradient(0deg, #557EFD 3%, #557EFD 100%);
	}

	.wode {
		// color: #FFFFFF;
		height: 100upx;
		display: flex;
		align-items: flex-end;
		justify-content: center;
		/* #ifdef H5 */
		font-size: 16px;
		margin-top: -30upx;
		/* #endif */
	}

	.camera {
		width: 54px;
		height: 44px;

		&:active {
			background-color: #ededed;
		}
	}

	.btn-bg {
		width: 64px;
		height: 28px;
		background: linear-gradient(90deg, #CDA26E 0%, #DCB78A 100%);
		border-radius: 28px;
		text-align: center;
		line-height: 28px;
		margin-top: 4px;
		color: '#604320'
	}

	.images {
		width: 18rpx;
		height: 30rpx;
	}

	.dfs {
		display: flex;
		align-items: center;
	}
</style>